home *** CD-ROM | disk | FTP | other *** search
/ Your Web Site Creator / Your Web Site Creator.iso / WebSite / data1.cab / Program_Executable_Files / ww.dat < prev    next >
Text File  |  1999-01-13  |  12KB  |  317 lines

  1. ; WW.DAT - version 3     Main Homepage Wizard script
  2. ;
  3. #NOGAUGE
  4.  
  5. [Start]
  6. LOADVARIABLES
  7. ARGUMENT modulepath( "WWDATA.VAR" )
  8. ARGUMENT lastProject
  9. ARGUMENT nFamilies
  10. ARGUMENT FamNameList
  11. ARGUMENT FamPhotoList
  12. ARGUMENT ProjNameList
  13. ARGUMENT nLoads
  14. ARGUMENT skipExplanations
  15. ARGUMENT nRightOuts
  16.  
  17. GOSUB CheckForValidFamilySites
  18.  
  19. SAVEVARIABLES
  20. ARGUMENT modulepath( "WWDATA.VAR" )
  21. ARGUMENT lastProject
  22. ARGUMENT nFamilies
  23. ARGUMENT FamNameList
  24. ARGUMENT FamPhotoList
  25. ARGUMENT ProjNameList
  26. ARGUMENT nLoads
  27.  
  28.  
  29. ;xxxxxxxxxxxxx Ask Whether To Start New Site xxxxxxxxxxxxxxxxxxxxxxxx
  30.    ; try to open the recent project
  31. GOSUB CommonInit
  32.  
  33. IF nRightOuts = 999
  34.   GOSUB AskForNoWiz
  35. ENDIF
  36.  
  37. OPENPROJECT ""  ;close out any open project
  38. IF fileexists( lastProject ) = "Yes"
  39.   OPENPROJECT lastProject
  40. ENDIF
  41.  
  42. SETTEMP makeNewSite = "No"
  43.  
  44. LOADVARIABLES
  45. ARGUMENT changeextension( lastProject "VAR" )
  46.  
  47. SETTEMP pr_modify = "&Modify the ",familyLastName," site"
  48. SETTEMP pr_new = "&Start a new Web site"
  49. SETTEMP pr_pick = "&Choose a site to modify"
  50. SETTEMP tx_modify = "\n         MAKE CHANGES\n\nChoose this to make modifications to the ",familyLastName," family Web site you previously created.\n\nYou can add or change sections, and make other changes."
  51. SETTEMP tx_new = "\n        START A NEW SITE\n\nChoose this option to start a new family Web site.\n\nUse this if you want to make a fresh start on your own Web site, or if you want to create a new site for someone else."
  52. SETTEMP tx_pick = "\n\n  PICK A SITE TO CHANGE\nThis option displays a list of family names and photos so that you can pick a different site to work on.\n\nYou presently have ",nFamilies," Web sites to pick from."
  53. SETTEMP sys_chgtx = "\n  MAKE SETTING CHANGES\n\nThis option permits you to change settings that control the behavior of the wizard.\n\nProceed with caution if you choose this item!"
  54. SETTEMP sys_chg = "Modify &wizard settings"
  55.  
  56. GOTO BeginSelections
  57.  
  58. [BeginSelections]
  59. IF ProjectExists = "Yes"        ;a site is open
  60.  STARTWIZARD
  61.  IF nFamilies < 2               ;they have one previous site
  62.   ; a project already exists
  63.   BACKSTOP
  64.   PAGE
  65.   NAME makeNewSite
  66.   WIZPIC wizpics\wizchoz2.gif
  67.   DESCRIPTION_RE "You have previously created a family Web site for the ",familyLastName," family.  Would you like to make modifications to the site or would you like to start over and create a new Web site?"
  68.   TYPE RADIOBUTTONSWITHTEXT
  69.   DEFAULT No
  70.   ARGUMENT pr_modify@No@tx_modify
  71.   ARGUMENT pr_new@Yes@tx_new
  72.   ARGUMENT sys_chg@Sys@sys_chgtx
  73.  ELSE
  74.     ;have several previous sites and a project is open
  75.   BACKSTOP
  76.   PAGE
  77.   NAME makeNewSite
  78.   WIZPIC wizpics\wizchoz2.gif
  79.   DESCRIPTION_RE "You have previously created ",nFamilies," Web sites.  The ",familyLastName," family site was worked on most recently and is now open.\n\nWould you like to make modifications to the site that is open, preview or publish it, choose a different site to work on, or create a new Web site?"
  80.   TYPE RADIOBUTTONSWITHTEXT
  81.   DEFAULT No
  82.   ARGUMENT pr_modify@No@tx_modify
  83.   ARGUMENT "Pre&view this Web site in your browser"@Preview@"PREVIEW in the BROWSER\n\nWant to see how your Web site will look on the Internet?\n\nThe wizard will create HTML files from your Web site information and then load your browser and let you see what the site will look like on the Net.  The files remain on your computer."
  84.   ARGUMENT "P&ublish this Web site (upload files to the Net)"@Publish@"\n  PUBLISH THE WEB SITE\n\nAre you ready to put the family Web site out onto the Net?\n\nChoose this item to upload the files for your Web site directly to the Internet."
  85.   ARGUMENT pr_new@Yes@tx_new
  86.   ARGUMENT pr_pick@Pick@tx_pick
  87.   ARGUMENT sys_chg@Sys@sys_chgtx
  88.  ENDIF
  89. ELSE
  90.  IF nFamilies > 1                       ;they have several previous sites
  91.   STARTWIZARD
  92.   BACKSTOP
  93.   PAGE
  94.   NAME makeNewSite
  95.   WIZPIC wizpics\filewiz.gif
  96.   DESCRIPTION_RE "You have previously created ",nFamilies," family Web sites.  Would you like to pick one of the existing Web sites and make modifications or would you like to start a new Web site?"
  97.   TYPE RADIOBUTTONSWITHTEXT
  98.   DEFAULT Pick
  99.   ARGUMENT pr_pick@Pick@tx_pick
  100.   ARGUMENT pr_new@Yes@tx_new
  101.   ARGUMENT sys_chg@Sys@sys_chgtx
  102.  ELSE                                   ;no previous sites
  103.   SETTEMP makeNewSite = "Yes"
  104.  ENDIF
  105. ENDIF
  106.  
  107. IF makeNewSite = "Sys"
  108.   GOSUB ClearOuts
  109.   GOSUB ModifyUserSettings
  110.   SAVEVARIABLES
  111.   ARGUMENT changeextension( ProjectFile "VAR" )
  112.   SETTEMP makeNewSite = "No"
  113.   GOTO BeginSelections
  114. ENDIF
  115.  
  116. IF makeNewSite = "Yes"
  117.    GOSUB ClearOuts
  118.    ; close the current project, we're going to make a new one
  119.    OPENPROJECT ""
  120.    STOPWIZARD
  121.    ; this is a script for a brand new site
  122.    RUNSCRIPT "scripts\new_site.dat"
  123. ENDIF
  124.  
  125. IF MakeNewSite = "Preview"
  126.  GOSUB ClearOuts
  127.  BUSY 1
  128.  ARGUMENT "Wait just a moment as the wizard prepares files for your browser.  Then, the wizard will launch your Browser program.  You may need to maximize your browser program when it starts."
  129.  
  130.  PREVIEW
  131.  BUSY 0
  132.  STOPWIZARD
  133.  RUNSCRIPT "ww.dat"     ;restart this one
  134. ENDIF
  135.  
  136. IF MakeNewSite = "Publish"
  137.   GOSUB ClearOuts
  138.   LOADVARIABLES
  139.   ARGUMENT changeextension( ProjectFile "VAR" )
  140. ;
  141.   IF hasGatheredFTPInfo <> "Yes"
  142.    SETTEMP no_skipping = "Yes"
  143.    GOSUB ServerBegin
  144.   ENDIF
  145.  
  146.   SETTEMP pub_description = "Before you can publish the files to the Internet, you must have your Internet connection active.  This means that you computer must be connected to the Internet through your modem.\n\nIf your computer is already connected to the Internet, press the Next button to continue.  If it is not connected, they make the connection first, and then press the Next button to continue.\n\nTo activate your Internet connection, "
  147.   IF Windows95 = "No"
  148.     SETTEMP pub_description = pub_description," press Alt+Tab or Ctrl+Esc to access the Windows task manager or Program manager."
  149.   ELSE
  150.     SETTEMP pub_description = pub_description," press Alt+Tab to switch to a different program or open folder or press Ctrl+Esc to bring up the Start button list."
  151.   ENDIF
  152.   SETTEMP pub_description = pub_description,"\n\nThen, you can activate your Internet connection and proceed."
  153.  
  154.   BACKSTOP
  155.   PAGE
  156.   WIZPIC wizpics\wizcast2.gif
  157.   TYPE DESCRIPTION
  158.   NAME pub_description
  159.   DESCRIPTION_RE pub_description
  160.  
  161.  
  162.   BUSY 1
  163.   ARGUMENT "Before the Web site can be published, the wizard must construct HTML files that are used on the Internet.  This could take a moment or two.  Please be patient."
  164.   SAVEVARIABLES
  165.   ARGUMENT changeextension( ProjectFile "VAR" )
  166.  
  167.   SETTEMP lastProject = ProjectFile
  168.   SAVEVARIABLES
  169.   ARGUMENT modulepath( "WWDATA.VAR" )
  170.   ARGUMENT lastProject
  171.  
  172.   PUBLISH
  173.   BUSY 0
  174.   STOPWIZARD
  175.   RUNSCRIPT "ww.dat"     ;restart this one
  176. ENDIF
  177.  
  178. IF MakeNewSite = "Pick"
  179.   GOSUB ClearOuts
  180.   GOSUB PickSiteToEdit
  181.   SETTEMP lastProject = arrayelement (ProjNameList familyNumber)
  182.   OPENPROJECT lastProject
  183.   SETTEMP MakeNewSite = "No"            ;set for next IF
  184. ENDIF
  185.  
  186. IF MakeNewSite = "No"
  187.    GOSUB ClearOuts
  188.    STOPWIZARD
  189.    ; change an existing site
  190.    RUNSCRIPT "scripts\modify.dat"
  191.    ARGUMENT ""
  192. ENDIF
  193.  
  194.  
  195. [PickSiteToEdit] ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  196. ; test for existance of the family sites; compress array as necessary
  197. SETTEMP familyNumber = 1
  198.  
  199. STARTWIZARD
  200. PAGE
  201. WIZPIC wizpics\filewiz.gif
  202. NAME familyNumber
  203. TYPE LIST
  204. DESCRIPTION Pick the family Web site that you wish to change from the list shown below.\n\nWhen you highlight the family name, the family photo will be shown to help you decide if this is the correct site.
  205. ARGUMENT arrayelement( FamNameList 1 )@1@arrayelement( FamPhotoList 1 )
  206. ARGUMENT arrayelement( FamNameList 2 )@2@arrayelement( FamPhotoList 2 )
  207. ARGUMENT arrayelement( FamNameList 3 )@3@arrayelement( FamPhotoList 3 )
  208. ARGUMENT arrayelement( FamNameList 4 )@4@arrayelement( FamPhotoList 4 )
  209. ARGUMENT arrayelement( FamNameList 5 )@5@arrayelement( FamPhotoList 5 )
  210. ARGUMENT arrayelement( FamNameList 6 )@6@arrayelement( FamPhotoList 6 )
  211. ARGUMENT arrayelement( FamNameList 7 )@7@arrayelement( FamPhotoList 7 )
  212. ARGUMENT arrayelement( FamNameList 8 )@8@arrayelement( FamPhotoList 8 )
  213. ARGUMENT arrayelement( FamNameList 9 )@9@arrayelement( FamPhotoList 9 )
  214. ARGUMENT arrayelement( FamNameList 10 )@10@arrayelement( FamPhotoList 1 )
  215. ARGUMENT arrayelement( FamNameList 11 )@11@arrayelement( FamPhotoList 1 )
  216. ARGUMENT arrayelement( FamNameList 12 )@12@arrayelement( FamPhotoList 1 )
  217. ARGUMENT arrayelement( FamNameList 13 )@13@arrayelement( FamPhotoList 1 )
  218. ARGUMENT arrayelement( FamNameList 14 )@14@arrayelement( FamPhotoList 1 )
  219. ARGUMENT arrayelement( FamNameList 15 )@15@arrayelement( FamPhotoList 1 )
  220. ARGUMENT arrayelement( FamNameList 16 )@16@arrayelement( FamPhotoList 1 )
  221. ARGUMENT arrayelement( FamNameList 17 )@17@arrayelement( FamPhotoList 1 )
  222. ARGUMENT arrayelement( FamNameList 18 )@18@arrayelement( FamPhotoList 1 )
  223. ARGUMENT arrayelement( FamNameList 19 )@19@arrayelement( FamPhotoList 1 )
  224. ARGUMENT arrayelement( FamNameList 20 )@20@arrayelement( FamPhotoList 20 )
  225. ARGUMENT arrayelement( FamNameList 21 )@21@arrayelement( FamPhotoList 21 )
  226. ARGUMENT arrayelement( FamNameList 22 )@22@arrayelement( FamPhotoList 22 )
  227. ARGUMENT arrayelement( FamNameList 23 )@23@arrayelement( FamPhotoList 23 )
  228. ARGUMENT arrayelement( FamNameList 24 )@24@arrayelement( FamPhotoList 24 )
  229. ARGUMENT arrayelement( FamNameList 25 )@25@arrayelement( FamPhotoList 25 )
  230.  
  231. [CheckForValidFamilySites]
  232. SETTEMP n = 1
  233. GOSUB CheckForValidFamilySitesX
  234.  
  235.  
  236. [CheckForValidFamilySitesX]
  237. IF n <= nFamilies
  238.   SETTEMP thisFamName = arrayelement( FamNameList n )
  239.   SETTEMP thisHPJFile = arrayelement( ProjNameList n )
  240.   SETTEMP thisPhoto = arrayelement( FamPhotoList n )
  241.  
  242.   IF fileexists( thisHPJFile ) = "No"
  243.     ; remove element n from the three arrays
  244.     SETTEMP m = add( n 1 )
  245.     GOSUB RemoveNthElements
  246.   ELSE
  247.     SETTEMP n = add( n 1 )
  248.   ENDIF
  249.  
  250.   GOTO CheckForValidFamilySitesX
  251. ENDIF
  252.  
  253. [RemoveNthElements]
  254. IF m <= nFamilies
  255.   SETTEMP p = subtract( m 1 )
  256.   SET arrayelement( FamNameList p ) = arrayelement( FamNameList m )
  257.   SET arrayelement( FamPhotoList p ) = arrayelement( FamPhotoList m )
  258.   SET arrayelement( ProjNameList p ) = arrayelement( ProjNameList m )
  259.  
  260.   SETTEMP m = add( m 1 )
  261.   GOTO RemoveNthElements
  262. ENDIF
  263. SET arrayelement( FamNameList nFamilies ) = ""
  264. SET arrayelement( FamPhotoList nFamilies ) = ""
  265. SET arrayelement( ProjNameList nFamilies ) = ""
  266. SET nFamilies = subtract( nFamilies 1 )
  267.  
  268. [AskForNoWiz]
  269. STARTWIZARD
  270.  
  271. BACKSTOP
  272. PAGE
  273. TYPE RADIOBUTTONS
  274. WIZPIC wizpics\wizmagic.gif
  275. NAME temp
  276. DESCRIPTION The wizard has observed that you are dismissing him without using him.  It will not hurt his feelings if you don't wish to have him called automatically anymore.  The wizard can be available with the "Website-Homepage Expert" menu choice instead of loading automatically.\n\nDo you wish to continue loading the wizard automatically?
  277. ARGUMENT "&Yes.  Keep starting the wizard"@Yes
  278. ARGUMENT "N&o.  I will call the wizard if needed"@No
  279.  
  280. IF temp = NN
  281.   WRITEINIVALUE
  282.   ARGUMENT NN
  283.   ARGUMENT "AlwaysRunWizard"
  284.   ARGUMENT "Preferences"
  285.   MESSAGEBOX "The wizard has been dismissed.  If you desire his services in the future, choose  Website-Homepage Expert  from the menu."
  286.   SETTEMP nRightOuts = 1000
  287. ELSE
  288.   SETTEMP nRightOuts = 0
  289. ENDIF
  290.  
  291. SAVEVARIABLES
  292. ARGUMENT modulepath( "WWDATA.VAR" )
  293. ARGUMENT nRightOuts
  294. IF temp = NN
  295.   STOPWIZARD
  296. ENDIF
  297.  
  298.  
  299. [ClearOuts]
  300. SETTEMP straightOut = 0
  301. IF nRightOuts > 0
  302.   LOADVARIABLES
  303.   ARGUMENT modulepath( "WWDATA.VAR" )
  304.   ARGUMENT nRightOuts
  305.  
  306.   SETTEMP nRightOuts = 0
  307.  
  308.   SAVEVARIABLES
  309.   ARGUMENT modulepath( "WWDATA.VAR" )
  310.   ARGUMENT nRightOuts
  311. ENDIF
  312.  
  313.  
  314. #INCLUDE scripts\server.dat
  315. #INCLUDE scripts\util.dat
  316. #INCLUDE scripts\homepage.dat
  317.